#include "informationview.h"
#include "logger.h"
#include <QVBoxLayout>
#include <QLabel>

using namespace views;
using namespace utilities;

InformationView::InformationView()
{
    initUI();
    setupUI();
}

InformationView::~InformationView()
{
    delete(_mainVBox);
}

void InformationView::initUI()
{
    Logger::logMessage("InformationView::initUI()");

    // Initialize UI objects
    _mainVBox = new QFrame();
}

void InformationView::setupUI()
{
    Logger::logMessage("InformationView::setupUI()");

    // Setup the main Grid Box
    //_mainVBox->setStyleSheet(QString::fromUtf8("background-color: rgb(255, 255, 0);"));
    this->setStyleSheet(QString::fromUtf8("background-color: rgb(255, 255, 0);"));

    // Add title
    QLabel *title = new QLabel(QString::fromUtf8("Mode information"));
    title->setStyleSheet(QString::fromUtf8("font: 12pt \"Rockwell\"; color: rgb(255, 255, 255);"));

    // Setup the layout and add widgets
    QVBoxLayout *vLayout = new QVBoxLayout;
    vLayout->addWidget(title, 0, Qt::AlignTop);
    // Add widgets here...

    //_mainVBox->setLayout(vLayout);
    this->setLayout(vLayout);

    //this->addWidget(_mainVBox);
}

void InformationView::setViewName(const QString& name)
{
    Logger::logMessage("InformationView::setViewName(const QString& name)");
    _viewName = name;
}
